﻿//Create By Leven
//Copyright 2008 LevenStudio
//http://leven.com.cn/
//For LevenBlog2.0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace LevenBlog.Core.Entities
{
    /// <summary>
    ///表lb_comment
    /// </summary>
    [Serializable]
    [DataContract(Name = "comment")]
    [Table("lb_comment", Info = "")]
    public class lb_comment : BaseEntity
    {
        [DataMember]
        [Column("id", DataType.Int32, Length = 4, CanNull = false, AutoIncrement = true, PrimaryKey = true)]
        public int id { get; set; }

        [DataMember]
        [Column("blogid", DataType.Int32, Length = 4, CanNull = false)]
        public int blogid { get; set; }

        [DataMember]
        [Column("title", DataType.VarChar, Length = 510)]
        public string title { get; set; }

        [DataMember]
        [Column("content", DataType.Text, CanNull = false)]
        public string content { get; set; }

        [DataMember]
        [Column("posttime", DataType.DateTime, CanNull = false)]
        public DateTime posttime { get; set; }

        [DataMember]
        [Column("user", DataType.VarChar, Length = 100, CanNull = false)]
        public string user { get; set; }

        [DataMember]
        [Column("userid", DataType.Int32, Length = 4, CanNull = false)]
        public int userid { get; set; }

        [DataMember]
        [Column("mail", DataType.VarChar, Length = 510)]
        public string mail { get; set; }

        [DataMember]
        [Column("ip", DataType.VarChar, Length = 200)]
        public string ip { get; set; }

        [DataMember]
        [Column("ismailnew", DataType.Bit, CanNull = false)]
        public bool ismailnew { get; set; }

        [DataMember]
        [Column("isshow", DataType.Bit, CanNull = false)]
        public bool isshow { get; set; }

        public lb_comment()
        {
            this.blogid = -1;
            this.userid = -1;
            this.content = string.Empty;
            this.id = -1;
            this.ip = string.Empty;
            this.ismailnew = false;
            this.mail = string.Empty;
            this.posttime = DateTime.Now;
            this.title = string.Empty;
            this.user = string.Empty;
            this.isshow = false;
        }

    }
}

